package the.broccoli.setting.interfaces.controller;

import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wisteria.framework.web.APIResult;
import the.broccoli.setting.domain.repository.ImportationRepository;
import the.broccoli.setting.entity.SettingImportation;
import the.broccoli.setting.interfaces.dto.ImportationRecordDTO;

import javax.annotation.Resource;

@RestController
@RequestMapping("/setting/importation")
public class ImportationController {

    @Resource
    private ImportationRepository importationRepository;

    @RequestMapping("/list")
    public APIResult<ImportationRecordDTO> list() {
//        importationRepository.
        return APIResult.success();
    }

    private ImportationRecordDTO convertOf(SettingImportation source) {
        ImportationRecordDTO target = new ImportationRecordDTO();
        BeanUtils.copyProperties(source, target);
        return target;
    }
}
